<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>SetDefaultMouseSpeed</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>SetDefaultMouseSpeed</h1>

<p>Sets the mouse speed that will be used if unspecified in <a href="Click.htm">Click</a> and <a href="MouseMove.htm">MouseMove</a>/<a href="MouseClick.htm">Click</a>/<a href="MouseClickDrag.htm">Drag</a>.</p>

<pre class="Syntax">SetDefaultMouseSpeed, Speed</pre>
<h3>Parameters</h3>
<dl>

  <dt>Speed</dt>
  <dd><p>The speed to move the mouse in the range 0 (fastest) to 100 (slowest). Note: a speed of 0 will move the mouse instantly. This parameter can be an <a href="../Variables.htm#Expressions">expression</a>.</p></dd>

</dl>

<h3>Remarks</h3>
<p>SetDefaultMouseSpeed is ignored for <a href="SendMode.htm">SendInput/Play modes</a>; they move the mouse instantaneously (however, <a href="SetMouseDelay.htm">SetMouseDelay</a> has a mode that applies to SendPlay). To visually move the mouse more slowly -- such as a script that performs a demonstration for an audience -- use <a href="Send.htm#Click"><code>SendEvent {Click 100, 200}</code></a> or <a href="SendMode.htm"><code>SendMode Event</code></a> (optionally in conjuction with <a href="BlockInput.htm">BlockInput</a>).</p>
<p>If this command is not used, the default mouse speed is 2. The built-in variable <strong>A_DefaultMouseSpeed</strong> contains the current setting.</p>
<p>The commands <a href="MouseClick.htm">MouseClick</a>, <a href="MouseMove.htm">MouseMove</a>, and <a href="MouseClickDrag.htm">MouseClickDrag</a> all have a parameter to override the  default mouse speed.</p>
<p>Whenever <em>Speed</em> is greater than zero, <a href="SetMouseDelay.htm">SetMouseDelay</a> also influences the speed by producing a delay after each incremental move the mouse makes toward its destination.</p>
<p>Every newly launched <a href="../misc/Threads.htm">thread</a> (such as a <a href="../Hotkeys.htm">hotkey</a>, <a href="Menu.htm">custom menu item</a>, or <a href="SetTimer.htm">timed</a> subroutine) starts off fresh with the default setting for this command. That default may be changed by using this command in the auto-execute section (top part of the script).</p>
<h3>Related</h3>
<p><a href="SetMouseDelay.htm">SetMouseDelay</a>, <a href="SendMode.htm">SendMode</a>, <a href="Click.htm">Click</a>, <a href="MouseClick.htm">MouseClick</a>, <a href="MouseMove.htm">MouseMove</a>, <a href="MouseClickDrag.htm">MouseClickDrag</a>, <a href="SetWinDelay.htm">SetWinDelay</a>, <a href="SetControlDelay.htm">SetControlDelay</a>, <a href="SetKeyDelay.htm">SetKeyDelay</a>, <a href="SetMouseDelay.htm">SetKeyDelay</a></p>
<h3>Example</h3>
<pre class="NoIndent">SetDefaultMouseSpeed, 0 <em>; Move the mouse instantly.</em></pre>

</body>
</html>
